package samples.d2.shapes 
{
	import flash.filters.GlowFilter;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	import samples.BaseSample;
	import shapes.shapes2D.Cross;
	import shapes.shapes2D.distribution.poissondisk.PoissonDisk;
	
	/**
	 * @author Nicolas Barradeau
	 * http://en.nicoptere.net
	 */
	public class Cross1 extends BaseSample
	{
		private var c:Cross;
		public function Cross1() 
		{
			
			filters = [ new GlowFilter( color, .25, 6, 6, 2, 3 )];
			
			var radius:Number = 35;
			var points:Vector.<Point> = PoissonDisk.distribute( new Rectangle( 0, 0, sw, sh ), radius, 5000 );
			
			
			var c:Cross
			for each( var p:Point in points )
			{
				var scale:Number = radius;// * 1.5 * Math.random();
				c = new Cross( new Rectangle( 0,0, scale, scale ) );
				c.rotation = Math.random()* 360;
				//c.rotationX = ( Math.random() - .5 ) * 60;
				//c.rotationY = ( Math.random() - .5 ) * 120;
				//c.rotationZ = ( Math.random() - .5 ) * 60;
				c.x = p.x;
				c.y = p.y;
				c.draw();
				addChild( c );
				
			}
			
			
		}
		
	}

}